// import component from 'virtual:svg-icons-register';

// 常量路由
export const constantRoute = [
    // 默认页：登录页
    {
        path: '/',
        component: () => import('@/views/login/index.vue'),
        redirect: '/login',
        meta: {
            title: "登录",//菜单标题
            hidden: true,//代表是否在菜单中隐藏
            icon: '',//菜单左侧的图标
        },
    },
    {
        path: '/mobile/agency/:id',
        name: 'MobileAgencyDetail',
        component: () => import('@/views/daily/agency/mobileDetail.vue'),
        meta: { title: '代办详情', hidden: true }
    },
    // 登录页
    {
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'login',//命名路由
        meta: {
            title: "登录",//菜单标题
            hidden: true,//代表是否在菜单中隐藏
            icon: '',//菜单左侧的图标
        },
    },
    // 注册页
    {
        path: '/register',
        component: () => import('@/views/register/index.vue'),
        name: 'register',//命名路由
        meta: {
            title: "注册",//菜单标题
            hidden: true,//代表是否在菜单中隐藏
            icon: '',//菜单左侧的图标
        },
    },
    // 首页
    {
        path: '/home',
        component: () => import('@/layout/index.vue'),
        name: 'layout',
        meta: {
            requiresAuth: true,
            title: "首页",//菜单标题
            hidden: false,//代表是否在菜单中隐藏
            icon: 'HomeFilled',//菜单左侧的图标
        },
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('@/views/home/index.vue'),
                meta: {
                    title: "首页",//菜单标题
                    hidden: false,//代表是否在菜单中隐藏
                    icon: 'HomeFilled',//菜单左侧的图标
                }
            }
        ]
    },
    // TODO 测试任务
    {
        path: '/experiment',
        component: () => import('@/layout/index.vue'),
        name: 'Experi',
        meta: {
            requiresAuth: true,
            title: '测试任务',
            hidden: false,
            icon: 'Lock',
        },
        redirect: '/experiment/user',
        children: [
            // {
            //     path:'/experiment/user',
            //     component:()=>import('@/views/experiment/users/index.vue'),
            //     name:'Users',
            //     meta:{
            //         title:'测试管理',
            //         icon:'User',
            //         hidden:false
            //     }
            // },
            // {
            //     path:'/experiment/project',
            //     component:()=>import('@/views/experiment/projects/index.vue'),
            //     name:'Projects',
            //     meta:{
            //         title:'项目管理',
            //         icon:'UserFilled',
            //         hidden:false
            //     }
            // },
            {
                path: '/experiment/uploadFileRes',
                component: () => import('@/views/experiment/test/uploadFileRes.vue'),
                name: 'UploadFileRes',
                meta: {
                    title: 'Res文件上传',
                    icon: 'Baseball',
                    hidden: false
                }
            },
            {
                path: '/experiment/cases',
                component: () => import('@/views/experiment/cases/index.vue'),
                name: 'Cases',
                meta: {
                    title: '测试用例管理',
                    icon: 'Baseball',
                    hidden: false
                }
            },
            {
                path: "/experiment/uploadFileRes",
                component: "@/src/views/test/uploadFileRes.vue",
                name: "Res",
                meta: {
                    title: 'Res文件上传',
                    icon: 'Baseball',
                    hidden: false
                }
            },
            // {
            //     path:'/experiment/note',
            //     component:()=>import('@/views/experiment/notes/index.vue'),
            //     name:'Notes',
            //     meta:{
            //         title:'笔记管理',
            //         icon:'Notebook',
            //         hidden:false
            //     }
            // },
            {
                path: '/experiment/demand',
                component: () => import('@/views/experiment/demands/index.vue'),
                name: 'Demands',
                meta: {
                    title: '需求管理',
                    icon: 'ChatSquare',
                    hidden: false
                }
            },
            {
                path: '/experiment/bugs',
                component: () => import('@/views/experiment/bugs/index.vue'),
                name: 'Bugs',
                meta: {
                    title: 'BUG管理',
                    icon: 'ChatSquare',
                    hidden: false
                },
            },
            {
                path: '/experiment/bugs/:id',
                component: () => import('@/views/experiment/bugs/bugList/index.vue'),
                name: 'BugsList',
                meta: {
                    title: 'BUG管理 / BUG列表',
                    icon: 'ChatSquare',
                    hidden: true
                }
            },
            /* {
                path:'/experiment/bugs/addRequirementBug/:id',
                component:()=>import('@/views/experiment/bugs/index.vue'),
                name:'AddBug',
                meta:{
                    title:'BUG管理 / 添加BUG',
                    icon:'ChatSquare',
                    hidden:true
                }
            }, */
            {
                path: '/experiment/wiki',
                component: () => import('@/views/experiment/wiki/index.vue'),
                name: 'WIKI',
                meta: {
                    title: 'wiki管理',
                    icon: 'Reading',
                    hidden: false
                }
            },
        ]
    },
    // TODO 研发任务
    {
        path: '/requirement',
        component: () => import('@/layout/index.vue'),
        name: 'Require',
        meta: {
            requiresAuth: true,
            title: '研发任务',
            hidden: false,
            icon: 'Platform',
        },
        redirect: '/requirement/create',
        children: [
            {
                path: '/requirement/alldistribute',
                component: () => import('@/views/requirement/allRequirement/index.vue'),
                name: 'Alldistribute',
                meta: {
                    title: '所有需求',
                    icon: 'Histogram',
                    hidden: false
                }
            },
            {
                path: '/requirement/create',
                component: () => import('@/views/requirement/createRequirement/index.vue'),
                name: 'Create',
                meta: {
                    title: '创建需求',
                    icon: 'FolderAdd',
                    hidden: false
                }
            },
            {
                path: '/experiment/file',
                component: () => import('@/views/experiment/files/index.vue'),
                name: 'Files',
                meta: {
                    title: '文件管理',
                    icon: 'FolderOpened',
                    hidden: false
                }
            },
            {
                path: '/experiment/workload',
                component: () => import('@/views/experiment/workload/index.vue'),
                name: 'Workload',
                meta: {
                    title: '报工作量',
                    icon: 'FolderOpened',
                    hidden: false
                }
            },
            {
                path: '/requirement/userCreate',
                component: () => import('@/views/requirement/userCreateRequirement/index.vue'),
                name: 'userCreate',
                meta: {
                    // title:'我创建的需求',
                    title: '我发起的',
                    icon: 'Stamp',
                    hidden: false
                }
            },
            {
                path: '/requirement/userReview',
                component: () => import('@/views/requirement/userReviewRequirement/index.vue'),
                name: 'userReview',
                meta: {
                    // title:'我待审核的需求',
                    title: '需求审核',
                    icon: 'Bell',
                    hidden: false
                }
            },
            {
                path: '/requirement/distribute',
                component: () => import('@/views/requirement/avgRequirement/index.vue'),
                name: 'Distribute',
                meta: {
                    title: '我的需求',
                    icon: 'Histogram',
                    hidden: false
                }
            },
            {
                path: '/requirement/alldistribute',
                component: () => import('@/views/requirement/allRequirement/index.vue'),
                name: 'AllDistribute',
                meta: {
                    title: '所有需求',
                    icon: 'Histogram',
                    hidden: false
                }
            },
            {
                path: '/requirement/noTipRequirement',
                component: () => import('@/views/requirement/noTipRequirement/index.vue'),
                name: 'noTipRequirement',
                meta: {
                    // title:'详细设计待审核',
                    title: '文件审核',
                    icon: 'School',
                    hidden: false
                }
            },
            {
                path: '/requirement/research',
                component: () => import('@/views/requirement/researchRequirement/index.vue'),
                name: 'Research',
                meta: {
                    // title:'我负责的任务',
                    title: '我的任务',
                    // icon:'DataLine',
                    icon: 'Histogram',
                    hidden: false
                }
            },
            {
                path: '/requirement/onlineReview',
                component: () => import('@/views/requirement/onlineReviewRequirement/infoReport.vue'),
                name: 'OnlineReview',
                meta: {
                    // title:'待上线评审需求',
                    title: '材料汇报',
                    icon: 'Position',
                    hidden: false
                }
            },
            {
                path: '/requirement/noGradeRequirement',
                component: () => import('@/views/requirement/noGradeRequirement/index.vue'),
                name: 'NoGradeRequirement',
                meta: {
                    // title:'已上线待评价',
                    title: '上线评价',
                    icon: 'Notification',
                    hidden: false
                }
            },
            {
                path: '/requirement/thisDayRequirement',
                component: () => import('@/views/requirement/thisDayRequirement/index.vue'),
                name: 'ThiDayRequirement',
                meta: {
                    // title:'今天上线的任务',
                    title: '今日上线',
                    icon: 'Sunny',
                    hidden: false
                }
            },
            {
                path: '/requirement/onlineTasks',
                component: () => import('@/views/requirement/onlineTasksRequirement/onlineTask.vue'),
                name: 'onlineTasks',
                meta: {
                    // title:'我的上线任务',
                    title: '上线任务',
                    icon: 'Reading',
                    hidden: false
                }
            },
            {
                path: '/requirement/myOffline',
                component: () => import('@/views/requirement/myOfflineRequirement/index.vue'),
                name: 'myOffline',
                meta: {
                    title: '我的上线',
                    icon: 'Upload',
                    hidden: false
                }
            },
        ]
    },
    {//日常记录
        path: '/daily',
        component: () => import('@/layout/index.vue'),
        name: 'Dailyrecords',
        meta: {
            requiresAuth: true,
            title: '日常记录',
            hidden: false,
            icon: 'Notebook',
        },
        redirect: '/daily/overtime',
        children: [
            {
                path: '/daily/overtime',
                component: () => import('@/views/daily/overtime/index.vue'),
                name: 'Overtime',
                meta: {
                    title: '加班申请',
                    icon: 'Bicycle',
                    hidden: false
                }
            },
            {
                path: '/daily/daily',
                component: () => import('@/views/daily/daily/index.vue'),
                name: 'Daily',
                meta: {
                    title: '填写日报',
                    icon: 'Bicycle',
                    hidden: false
                }
            },
            {
                path: '/daily/trip',
                component: () => import('@/views/daily/trip/index.vue'),
                name: 'Trip',
                meta: {
                    title: '填写日报',
                    icon: 'Bicycle',
                    hidden: false
                }
            },
            {
                path: '/daily/meeting',
                component: () => import('@/views/daily/meeting/index.vue'),
                name: 'Meeting',
                meta: {
                    title: '会议记录',
                    icon: 'Comment',
                    hidden: false
                }
            },
            {
                path: '/daily/agency',
                component: () => import('@/views/daily/agency/index.vue'),
                name: 'Agency',
                meta: {
                    title: '代办事项',
                    icon: 'Comment',
                    hidden: false
                }
            },
            {
                path: '/daily/leave',
                component: () => import('@/views/daily/leave/index.vue'),
                name: 'Leave',
                meta: {
                    title: '调休录入',
                    icon: 'Comment',
                    hidden: false
                }
            },
            {
                path: '/daily/version',
                component: () => import('@/views/daily/version/index.vue'),
                name: 'Version',
                meta: {
                    title: '产品版本',
                    icon: 'Plus',
                    hidden: false
                }
            },
            {
                path: '/daily/onlinePlan',
                component: () => import('@/views/daily/onlinePlan/index.vue'),
                name: 'OnlinePlan',
                meta: {
                    title: '上线计划',
                    icon: 'Upload',
                    hidden: false
                }
            },
        ]
    },
    {//人员管理
        path: '/personnel',
        component: () => import('@/layout/index.vue'),
        name: 'Personnel',
        meta: {
            requiresAuth: true,
            title: '人员管理',
            hidden: false,
            icon: 'User',
        },
        redirect: '/personnel/teamUsers',
        children: [
            {
                path: '/personnel/teamUsers',
                component: () => import('@/views/boss/literary/index.vue'),
                name: 'TeamUsers',
                meta: {
                    title: '人员管理',
                    icon: 'Bicycle',
                    hidden: false
                }
            },
            {
                path: '/personnel/position',
                component: () => import('@/views/boss/position/index.vue'),
                name: 'Position',
                meta: {
                    title: '绩效配置',
                    icon: 'Bicycle',
                    hidden: false
                }
            },
            {
                path: '/personnel/performance',
                component: () => import('@/views/boss/performance/index.vue'),
                name: 'Performance',
                meta: {
                    title: '绩效计算',
                    icon: 'Trophy',
                    hidden: false
                }
            },
            {
                path: '/personnel/fault',
                component: () => import('@/views/boss/fault/index.vue'),
                name: 'Fault',
                meta: {
                    title: '故障记录',
                    icon: 'Warning',
                    hidden: false
                }
            }
        ]
    },
    // 404
    {
        path: "/404",
        component: () => import('@/views/404/index.vue'),
        name: '404',
        meta: {
            title: "404",//菜单标题
            hidden: true,//代表是否在菜单中隐藏
            icon: 'Promotion',//菜单左侧的图标
        }
    },
    // 其余路由到404页面
    {
        path: '/:pathMatch(.*)*',
        redirect: '/404',
        name: 'Any',
        meta: {
            title: "任意路由",//菜单标题
            hidden: true,//代表是否在菜单中隐藏
            icon: 'Promotion',//菜单左侧的图标
        }
    },
    {
        path: '/bug/:id',
        name: 'BugDetail',
        component: () => import('@/views/experiment/bugs/BugDetail.vue'),
        meta: { title: 'Bug详情' }
    },
    {
        path: '/wiki/:id',
        name: 'WikiDetail',
        component: () => import('@/views/experiment/wiki/wikiDetail.vue'),
        meta: { title: 'Wiki详情' }
    },
    {
        path: '/requirement/:id',
        name: 'requirementDetail',
        component: () => import('@/views/requirement/avgRequirement/requirementDetail.vue'),
        meta: { title: 'Wiki详情' }
    },
    {
        path: '/sixCode/:id',
        name: 'sixCode',
        component: () => import('@/views/login/loginDetail.vue'),
        meta: { title: '登录验证码' }
    },
    {
        path: '/requirementDatil',
        name: 'noGradeRequirement',
        component: () => import('@/views/requirement/noGradeRequirement/requirementDatil.vue'),
        meta: { title: '上线评价' }
    },
    {
        path: '/checkDailyDatil',
        name: 'checkDailyDatil',
        component: () => import('@/views/experiment/daily/index.vue'),
        meta: { title: '查看日报' }
    },
    {
        path: '/daily/daily/:id',
        name: 'DailyDetail',
        component: () => import('@/views/daily/daily/detail.vue'),
        meta: { 
            title: '日报详情',
            hidden: true 
        }
    }
];